/* global Office, Word */
import Cookies from 'js-cookie'
import store from "../../store";

const TokenKey = 'Token';
const CASRedirectKey = 'redirect';
const PageRedirctKey = 'pageRedirect';

export function getToken() {
    console.log(Cookies.get(TokenKey));
    return Cookies.get(TokenKey);
}

export function setToken(token) {
    return Cookies.set(TokenKey, token, { expires: parseInt(process.env.REACT_APP_COOKIE_EXPIRE_DAYS) })
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}

export function getCASRedirect() {
    return Cookies.get(CASRedirectKey)
}

export function setCASRedirect(redirect) {
    return Cookies.set(CASRedirectKey, redirect)
}

export function getPageRedirct() {
    return Cookies.get(PageRedirctKey)
}

export function setPageRedirct(redirect) {
    return Cookies.set(PageRedirctKey, redirect)
}

